Cube map texturing is a form of texture mapping for graphics processing that utilizes a three-dimensional directional vector as an index into a texture that is a six-faced cube. As illustrated in FIG. 1, the six faces 100, 101, 102, 103, 104, and 105 of the cube are stored as a set of six two-dimensional textures. Cube map texturing is, for example, described in the OpenGL® Graphics System Specification Version 2.0, Appendix F, the contents of which are hereby incorporated by reference.
Referring to FIG. 2, in the OpenGL® implementation of cube map texturing a three-dimensional direction vector 201 emanating from the center of a cube 200 is used to select one of the cube map faces. The intersection point 205 of three-dimensional vector 201 with cube 200 is used to identify a cube face. Additionally, the intersection point 205 is used to identify texture coordinates on the cube face to fetch a texture value.
Cube map textures are useful for storing directional data because of the nature in which the cube map is indexed by a directional vector 201. As one example, bi-directional reflectance distribution function (BRDF) data is often stored in cube maps so that the view and light directions can be used to index the function using a simple texture lookup.
One limitation of conventional cube map texturing is that the current generation of graphics processing hardware and application programming interfaces (APIs) does not support arrays of cube map textures. For example, the DirectX 10.0 API does not support arrays of cube map textures. As a consequence, conventional cube map texturing cannot be directly used to access different instances of cube map textures. One consequence of this limitation is that conventional cube map texturing techniques do not directly support utilizing cube map texturing to provide directional data with different attributes for a collection of different objects rendered at the same time.
In light of the above-described problems the apparatus, system, and method of the present invention was developed.